﻿using System.Data.Linq.Mapping;

namespace Jiubang.Authentications.Loggers {
    /// <summary>
    /// <see cref="IDbLoggerInfo"/>接口的默认实现
    /// </summary>
    [Table(Name = "Authentication_Log")]
    public sealed class DbLoggerInfo : IDbLoggerInfo {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Column(IsDbGenerated = true, IsPrimaryKey = true)]
        public int ID { get; set; }

        #region IDbLoggerInfo Members

        /// <summary>
        /// 用户ID
        /// </summary>
        [Column]
        public int UserID { set; get; }

        /// <summary>
        /// 用户请求的路径
        /// </summary>
        [Column]
        public string Path { set; get; }

        /// <summary>
        /// 用户执行的命令
        /// </summary>
        [Column]
        public string Action { set; get; }

        /// <summary>
        /// 用户命令参数或详细信息
        /// </summary>
        [Column]
        public string Detail { set; get; }

        #endregion
    }
}